package org.example.cet.demos.domain.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class HomeworkForm {

    private Long id;
    /**
     * 作业标题
     */
    @NotBlank(message = "请输入班级")
    private String classId;

    /**
     * 作业标题
     */
    @NotBlank(message = "请输入作业标题")
    private String title;

    /**
     * 题目id
     */
    @NotBlank(message = "请输入题目id")
    private String questionId;

    /**
     *0:作业 1:试卷 2:专项
     */
    @NotNull(message = "请输入答题类型")
    private Integer type;

    /**
     * 截止时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime dueDate;
}
